﻿using System.Reflection;

namespace LeopardAOP.Aspects
{
    /// <summary>
    ///  Abstract class for arguments of aspect which intercept a method.
    /// </summary>
    public abstract class MethodInterceptionArgs : MethodArgs
    {
        internal MethodInterceptionArgs(object instance, MethodInfo method, Arguments arguments)
            : base(instance, method, arguments)
        { }

        /// <summary>
        ///  Proceeds with invocation of the method that has been intercepted by calling the next node in the chain of invocation, 
        /// passing the current <see cref="Arguments"/> to that method 
        /// and storing its return value into the property <see cref="MethodArgs.ReturnValue"/>
        /// </summary>
        public abstract void Proceed();
    }
}
